package com.edu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 冲突检测表
 * @TableName conflict_detection
 */
@TableName(value ="conflict_detection")
@Data
public class ConflictDetection {
    /**
     * 冲突ID
     */
    @TableId(type = IdType.AUTO)
    private Long conflictId;

    /**
     * 考试ID
     */
    private Long examId;

    /**
     * 冲突类型
     */
    private Object conflictType;

    /**
     * 冲突资源ID
     */
    private Long conflictResource;

    /**
     * 冲突开始时间
     */
    private Date conflictStartTime;

    /**
     * 冲突结束时间
     */
    private Date conflictEndTime;

    /**
     * 解决状态
     */
    private Object solveStatus;

    /**
     * 解决时间
     */
    private Date solveTime;

    /**
     * 解决方法
     */
    private String solveMethod;

    /**
     * 解决人ID
     */
    private Long solvePersonId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ConflictDetection other = (ConflictDetection) that;
        return (this.getConflictId() == null ? other.getConflictId() == null : this.getConflictId().equals(other.getConflictId()))
            && (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId()))
            && (this.getConflictType() == null ? other.getConflictType() == null : this.getConflictType().equals(other.getConflictType()))
            && (this.getConflictResource() == null ? other.getConflictResource() == null : this.getConflictResource().equals(other.getConflictResource()))
            && (this.getConflictStartTime() == null ? other.getConflictStartTime() == null : this.getConflictStartTime().equals(other.getConflictStartTime()))
            && (this.getConflictEndTime() == null ? other.getConflictEndTime() == null : this.getConflictEndTime().equals(other.getConflictEndTime()))
            && (this.getSolveStatus() == null ? other.getSolveStatus() == null : this.getSolveStatus().equals(other.getSolveStatus()))
            && (this.getSolveTime() == null ? other.getSolveTime() == null : this.getSolveTime().equals(other.getSolveTime()))
            && (this.getSolveMethod() == null ? other.getSolveMethod() == null : this.getSolveMethod().equals(other.getSolveMethod()))
            && (this.getSolvePersonId() == null ? other.getSolvePersonId() == null : this.getSolvePersonId().equals(other.getSolvePersonId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getConflictId() == null) ? 0 : getConflictId().hashCode());
        result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode());
        result = prime * result + ((getConflictType() == null) ? 0 : getConflictType().hashCode());
        result = prime * result + ((getConflictResource() == null) ? 0 : getConflictResource().hashCode());
        result = prime * result + ((getConflictStartTime() == null) ? 0 : getConflictStartTime().hashCode());
        result = prime * result + ((getConflictEndTime() == null) ? 0 : getConflictEndTime().hashCode());
        result = prime * result + ((getSolveStatus() == null) ? 0 : getSolveStatus().hashCode());
        result = prime * result + ((getSolveTime() == null) ? 0 : getSolveTime().hashCode());
        result = prime * result + ((getSolveMethod() == null) ? 0 : getSolveMethod().hashCode());
        result = prime * result + ((getSolvePersonId() == null) ? 0 : getSolvePersonId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", conflictId=").append(conflictId);
        sb.append(", examId=").append(examId);
        sb.append(", conflictType=").append(conflictType);
        sb.append(", conflictResource=").append(conflictResource);
        sb.append(", conflictStartTime=").append(conflictStartTime);
        sb.append(", conflictEndTime=").append(conflictEndTime);
        sb.append(", solveStatus=").append(solveStatus);
        sb.append(", solveTime=").append(solveTime);
        sb.append(", solveMethod=").append(solveMethod);
        sb.append(", solvePersonId=").append(solvePersonId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}